±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±NPHELP±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ EDITING COMMANDS AND NON-LETTER KEYS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Edit data (spreadsheet) at previous row & col. ,q,quit In NPDATA - Quit (terminate and return to DOS) (with option to save current spreadsheet) In NPLOT - Quit (return to NPDATA) ' Used to denote comment in a program F1, h Help F2 Cut line F3 Add line F4 Paste F5 Toggle normal/high-ASCII (Greek) characters F10 , show Toggle display to list data sets or functions Toggle insert/overwrite mode Delete character In NPDATA - Toggles between normal and high ASCII (Greek letters) In NPLOT - Selects font find [expression] Find and position cursor at the entry in spreadsheet equal to 'expression' max [set#] Position cursor at maximum value in dataset min [set#] Position cursor at minimum value in dataset Alt-X Quit, abandon spreadsheet ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ DATA SPREADSHEET COMMANDS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Any numbers or numeric expressions can be entered into the spreadsheet. Since lower-case s,i,x, and o are also spreadsheet commands, numeric expressions starting with these numbers should begin with capital letters. s Statistics on selected data i Insert a data point. o Toggle between insert and overwrite mode. x Delete a data point. Shift-Up arrow Select data up (reverse-order select) Shift-Down arrow Select data down (forward-order select) Up Move cursor up Down Move cursor down Left Move to next data set on the left Right Move to next data set on the right F3 Show present command screen F5 Toggle normal/high-ASCII (Greek) characters F10 Enter command (if 'e' or 'edit', jumps to a second point to edit) Home Move to top of data set End Move to bottom of data set Ctrl-Left Move to 1st data set Ctrl-Right Move to last data set Ctrl-B Reverse data set (backwards) Ctrl-C Copy data set to scrap Ctrl-F Find next value equal to a numeric expression Ctrl-I Copy data set from scrap Ctrl-T Change title of data set Ctrl-V Put number at cursor into a variable Ctrl-X Delete current data set Insert Insert or overwrite at cursor with selected data Delete Delete selected data Esc Quit ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMANDS AND MATH OPERATIONS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ You may enter 1st 3 letters, the whole name (except where noted), or the indicated abbreviation along with the parameters indicated in brackets. To skip a parameter, leave an extra space. b [n] Beep n times Ex.: b 4 beeps 4 times (useful in long programs). ca Calculator mode. All pre-defined and user-defined functions are available. The previous calculation result is available in variable x. Non-linear regression parameters are available in variables a1 to a20. c [dataset1] [dataset2] Copy (move) first data set to position of 2nd data set, replacing its contents. cc Configure (Set colors, set up printer and plotter parameters, redimension rows and columns, etc.) Syntax: 'cc' only. cls Clear screen (erase current commands) erase Erase all current variables dy [dataset] Derivative dy/dx of dataset n edit, ed, e [col][row] Edit data, optionally specifying row and column or column only. ex [dataset] [number] Expand or shrink the dataset to contain a new number of data points. If expand- ing, new values are interpolated between the old ones. If shrinking, they are averaged. ext [extension] Change default extension, bypassing 'cc'. int [dataset] Integrate dataset. l [dataset] [new_length] Change the no.of data points in a data set without entering edit mode. lr [x-dataset] [y-dataset] Linear regression between two data sets. mm Activate advanced math functions (in NPMATH) (Menu-driven) mod [set1] [set2] [result_set] Calculate modulus of 2 data sets and store the result in the result dataset. n [dataset] Substitute 0 for any data points in the dataset which are <0. norm [normvalue] Normalize all data in all data sets so that each data set is scaled so that its maximum value is normvalue. peak [dataset] Calculate maxima, minima, peak areas, etc. for a data set. Maxima, minima, areas, and a baseline may be stored as new data sets in this routine. ramp [dataset] Set dataset equal to a set of integers. show , F10 Toggle between showing data and functions in main display. sm [datset] [n] Smooth a dataset, using n point smoothing (Where 2 <= n <= 17). sort [dataset] Sort data set. You can specify whether the other datasets will also be rearranged (linked sort). sq [dataset] [number] Expand or shrink the dataset to contain a new number of data points. If expand- ing, new values are interpolated between the old ones. If shrinking, they are averaged. stat Statistics on selected data. Data are selected in the Data Editor by pressing Shift-Up arrow or Shift-Down arrow. This command may also be entered while in the Data Editor. sw [dataset1] [dataset2] Swap 2 sets Ex.: sw 1 2 t [dataset] [new_title] Set title for a dataset x [first_dataset] [last_dataset], Erase a single dataset, or erase all x [dataset] datasets between the first one and last one specified. Ex.: x 3 5 xx Erase all data sets from memory xrow [start_row] [end_row], Erase a single row from all datasets, or xrow [row] erase all data between the starting row and ending row in all data sets without entering data editor. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ MATH FUNCTIONS WHICH CAN BE ENTERED IN COMMANDS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ abs absolute value sin sine (degrees) int integer cos cosine (degrees) log log base 10 tan tangent (degrees) ln log base e atn arctangent (to degrees) rnd random number sqr square root ran random number exp exponential fac factorial hex hexadecimal number asn arcsine (to degrees) acs arccosine (to degrees) bin(n m) binomial of n and m Arithmetic operators: + - * / ^ Logic operators (false=0, true=1): = < > <> <= >= Any user-defined functions can also be entered as part of a command or parameter. For instance, if you entered: f=sin[log[a]] then you could enter: y1=sqr(2)+f(x). (This of course would give an error unless the constant "a" had been defined, for instance by typing: a=4 ). x is a pre-defined variable which, in this context, represents the row number in the data set y1. Y1 is the 1st data set, y2 is the 2nd one, etc. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ DISK OPERATIONS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ r Read data from a disk file (menu driven) Use TAB to change between entry fields. r [filename] [dataset] [offset] [a|o|e] Command-driven form for reading from a disk file. Reads data from specified filename into the dataset, skipping 'offset' number of data points. The 4th parameter indicates whether all the numbers, or only the odd- or even-numbered ones are to be loaded. Ex.: r test.dat 2 0 a Ex.: k=3 r test k 100 e rr [filename] Read entire spreadsheet into memory, replacing all data, plot parameters, and commands with those stored in the specified .INI file. rf [filename] Read the command list (function list) stored in the specified .FNC file. cd [path] Change Directory (similar to DOS CD command) Also changes the path used in searching for data and .INI files. s [dataset] [filename] Save a single dataset under the specified filename. Ex.: s 1 test.dat ss [filename] Save entire spreadsheet, including commands, all data, and plot parameters into the specified .INI file. sf [filename] Save command list (function list) into the specified .FNC file. con [filename] [type1] [type2] Convert a data file from one type to another. Valid file types are : A, ASC =ASCII D, DIF =DIF file B, BIN =binary ren [oldname] [newname] Rename a file (similar to DOS REN command). dos Temporarily go to DOS. Data are preserved while in DOS. Type 'EXIT' to return to program. dos [command] Execute dos command (ex.: dos dir/p). Use CTRL-Break to interrupt. dir [filemask] Directory (same as DOS DIR command). ems ['off'] Install portions of the program in extended memory. You must first create a virtual disk or ramdisk of appropriate size using DOS's VDISK or RAMDISK. Then select which files to copy to the virtual disk using the menu. Installing NPLOT and font files in ems will greatly speed up graphics and other operations. If 1st argument is "off", it turns ems handling off. path Set paths. You can select different drives and/or subdirectories for data files and various parts of the program. (Menu driven) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GRAPHICS [NPLOT] ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ d Draw (All graphics operations are pal Palette menu-driven.) p [dataset] ["same"] Plot specified dataset. If you type "same" menus are skipped. ex.: p plot (uses menus) p 6 plot dataset #6 (menus) p 6 same plot dataset #6 and skip menus. p same plot previous dataset and skip menus. ri [filename] Retrieve Image with specified filename (".IMA" is assumed as extension). ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ADVANCED MATH [NPMATH SELECTIONS] ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ In this section, only the abbreviations listed can be used. See manual for more details on advanced math. mm Menu of math options fft [real_dataset] [1|-1] [imag_dataset] [real_result_dataset] [imag_re- sult_dataset] Fourier transform Ex.: fft 4 1 0 2 3 Calculate forward FFT on data set 4, with no imaginary data, storing real result in #2 and imag. result in #3. mat [matno],[title],[startrow],[startcol],[#_rows],[#_cols] Define matrix, optionally giving parameters cro Cross product between 2 vectors/matrices sol Solve matrix eq. cvl [set1] [set2] [width] Convolute dataset 1 with dataset 2. If dataset2 = 0, the width will determine the width of the Gaussian to convolute with. dec [set1] [set2] [width] [deconvolution_parameter] Deconvolute dataset 1 from the response function defined in dataset 2. If dataset2 = 0, the width will determine the width of the Gaussian to deconvolute from. The optional deconvolution parameter is used to prevent excessive FFT amplitudes. It is only useful when set2=0. Typical values are 1.1-2.0 (default=1.0). ex.: dec 1 0 11 1.1 de2 [set] [exponent_parameter] Deconvolutes as above, but uses method 2 which is faster and more robust for noisy data (Gaussian response function only). ex.: de2 1 .001 nlr Non-linear regression. Select a general equation from the menu, or type in a new equation. All user-defined functions and constants are available when entering an equation. The eq. must be entered in the form: y=f{x,a1...an}; for example, y=a1*x + a2*exp(x^2)-b. The fitted param- eters, a1 to a20, are then available in the main program. fil [dataset] [width] Filters dataset by convoluting with a Gaussian of specified width. (same effect as 'sm'). xma [mat1],[mat2],[resultmat] Multiply matrices or vectors. (cross-product) inv [matno] Matrix inverse (# matno) tra [matno] [resultmatrixno] Transpose of matrix (optionally giving starting and destination matrix numbers) erf [dataset] Calculates gamma function and places it in the specified dataset. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENTERING ARITHMETIC EXPRESSIONS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Arithmetic expressions may be entered in the data spreadsheet or as arguments to most commands. y, y1 to yn = data sets (n= number of columns in present configuration) x = integer set (index of the dataset) Examples: y6(4-5) = x^2 Sets data points 4 to 5 in dataset #6 equal to x^2 (i.e., set equal to 16 and 25). y1=y2+y3 Sets all points in dataset #1 equal to the sum of the corresponding points in #2 and #3. f=sqr(x+1) Defines function 'f' y1=f(x) Sets all points in dataset #1 equal to the value of the user-defined function f for each x á=à^2 Sets á to be a function of à. Thus, whenever à changes, á will also automatically change. asdf=asdf+2 Redefines constant asdf or function asdf to a new value. asdf? or asdf Typing a variable or function by itself causes f(1) the value of the expression to be printed. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ARITHMETIC OPERATOR-BASED COMMANDS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The following arithmetic operators also can be used independently of a mathematical expression, to give greater speed: + - * / ^ Syntax: [Operator] [dataset1] [parameter|dataset2] Examples: + 1 4 adds a '4' to dataset #1 * 2 2*pi/360 multiplies dataset #2 by 2*pi/360, where pi is a user-defined constant. + 1 f(a) adds the constant obtained by evaluating f(a) to set #1. Any other expression evaluating to a constant can be used. / 4 rnd divides dataset#4 by a random number. (The same random number is used for each element in #4.) + 3 y2 adds dataset #2 to dataset #3. This is the only case where something other than a constant can be used. If a dataset (y#) is used here, it must be by itself and not part of an expression. The data commands described earlier also operate in this manner. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PROGRAMMING IN NPDATA ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Any collection of commands can be turned into a program simply by enclosing them between the program indicators: { [ begin ] } end. The line at which the statement appears can also serve as a jump label for 'g' (goto). For example, the following program copies the data in set#1 to sets 3-8: a=3 'Suppose this is line 1 { 'Program starts here c 1 a 'Line 3 a=a+1 if a>8 end 'Program will stop when a>8 g 3 'Jump to line 3 } 'Program terminates here You can terminate a program at any time by typing . Multiple commands on a line are also possible: r test.dat 1|beep 'Reads test.dat then beeps r test.dat 0 a|g 4 '(Suppose this is at line 4). Reads test.dat, pausing to request data set, then repeats indefinitely until you press . ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PROGRAMMING COMMANDS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ { [ , begin Begin program },], end End program | Statement divider [for multiple commands/line] g [n] , goto [n] Jump to line n and execute statement g [statementlabel], goto [statementlabel] Jump to statement marked with statement label and execute statement label: Statement label Ex.: a: if [condition] [command] Conditional execution Ex.: if a=5 beep 2. If conditional has spaces, enclose in ( ). For OR or AND, use + and * (0=false <>0=true). ("Then" is optional). "FOR" LOOPS for [variable] = [start_value] to [end_value] { (or any program start symbol, i.e.,[ { begin) [statements] } (or any program end symbol, i.e., ] } end) Example: for k=1 to 5 { copy k k+10 } "WHILE" LOOPS while [condition] { (or any program start symbol, i.e.,[ { begin) [statements] } (or any program end symbol, i.e., ] } end) Example: a=10 while a>5 begin * a 2 a=a-1 end